home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-05 / rsu10a.zip / RSU.TXT < prev    next >
Text File  |  1992-12-28  |  32KB  |  906 lines

  1.                                
  2.                             RSU 1.0
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                                
  14.          Remote Software Update for DOS--Documentation
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                                
  36.      Copyright (c) 1992 Burkhard Daniel & Hans-Georg Michna
  37.                                
  38.                        Table of Contents
  39.  
  40.  
  41.  
  42.  
  43.      Brief Command Overview
  44.      Licensing and Support
  45.      Introduction
  46.      How RSU Works
  47.      Installing RSU
  48.         RSU Server Preparation
  49.         Workstation Preparation
  50.      The RSU Development Cycle
  51.         Steps of the RSU Development Cycle
  52.         Prepare an RSU Test Workstation
  53.         Create and Test the New Module
  54.         Protect Users From Your Tests
  55.         Upload the New Module to the RSU Server
  56.         Adapt the RSU Program
  57.         Test the New RSU Program
  58.         Activate the New RSU Program
  59.      Control Files
  60.         RSU Batch File
  61.         RSU Program (RSU.PRG)
  62.      Alphabetical List of Commands
  63.         General Command Syntax
  64.         Environment Variables
  65.         DOS Commands
  66.         Equal
  67.         IniAddLine
  68.         IniChangeLine
  69.         IniCopyLine
  70.         IniCopySection
  71.         IniDeleteLine
  72.         IniDeleteSection
  73.         SyncDir
  74.  
  75.  
  76.                                
  77.                   RSU____C.DOC [14] 26.12.92
  78.  
  79.  
  80.  
  81. Brief Command Overview
  82.  
  83. In the following text each group of syntax lines is followed by
  84. one or more example lines which are indented.
  85.  
  86. RSU <program file name>
  87. RSU.EXE <program file name>
  88.     f:
  89.     cd \rsu
  90.     rsu rsu.prg
  91.  
  92. EQUAL <file name 1> <file name 2>
  93. EQUAL.COM <file name 1> <file name 2>
  94.     f:\rsu\equal f:\rsu\version.txt c:\rsu\version.txt
  95.  
  96. IniAddLine <ini file> [<section name>] <variable name>=<text>
  97.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VPD.386
  98.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=%NEW_DEVICE%
  99.     
  100.     (The  second  example above also shows  how  to  insert  an
  101.     environment variable.)
  102.  
  103. IniChangeLine <ini file> [<section name>] <variable>=<text>
  104.     IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  105.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  106.     
  107.     (The  second  example above also shows  how  to  insert  an
  108.     environment variable.)
  109.  
  110. IniCopyLine <source ini file> <target ini file> [<section name>] <variable>
  111.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI [windows] load
  112.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI [windows] load=
  113.  
  114. IniCopySection <source ini file> <target ini file> [<section name>]
  115.     IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI
  116.       C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  117.  
  118. IniDeleteLine <ini file> [<section name>] <variable>
  119.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  120.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  121.  
  122. IniDeleteSection <ini file> [<section name>]
  123.     IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  124.  
  125. SyncDir <source directory> <target directory> [/D] [{ /O | /C }] [/A] [/S]
  126.     SyncDir F:\RSU\WSIMAGE\U C:\U /D /O /A /S
  127.     SyncDir F:\RSU\WSIMAGE\DOS C:\DOS /O /A
  128.  
  129. SyncDir switches:
  130.     
  131.     /D Delete  files  from the target directory  if  they don't
  132.        exist in the source directory.
  133.     
  134.     /A Add  files to the target directory if they are not there
  135.        already.
  136.     
  137.     /O Overwrite  files  in the target directory  if  they also
  138.        exist  in  the source directory but are different  (have
  139.        different  size, date or time). This switch may  not  be
  140.        used together with the /C switch.
  141.     
  142.     /C Conflict   management.  This  switch  may  not  be  used
  143.        together  with the /O switch. If a file name  exists  in
  144.        both  source  and target directories but with  different
  145.        size,  date or time, then this is considered a  conflict
  146.        and  both  files are retained with different file  names
  147.        (see full documentation).
  148.  
  149.  
  150.  
  151. Licensing and Support
  152.  
  153. RSU  including  its  EQUAL.COM, SYNCDIR.EXE  and  documentation
  154. files is Copyright  1992 Burkhard Daniel and Hans-Georg Michna.
  155. It  is  distributed  under the Shareware concept.  Its  use  on
  156. isolated PCs, for example to change settings in WIN.INI through
  157. batch  files without the involvement of any network file server
  158. is  free,  even if the computer is connected to a  network.  As
  159. soon as RSU is used to copy files from a network file server to
  160. a  user's  local storage or to copy any parts of files  of  the
  161. Windows INI type from a network file server, however, its  free
  162. use  is  restricted to a 30 day trial period.  After  that  the
  163. shareware fee has to be paid through CompuServe's SWREG if  the
  164. program is still used.
  165.  
  166. The  fee  is  US $50.00 for each group of up to 100  users.  In
  167. other words, if the program is used for 1 to 100 users, the fee
  168. is  US  $50.00. If it is used for 101 to 200 users, the fee  is
  169. US  $100.00, for 201 to 300 users US $150.00 and so on.  Future
  170. enhanced versions of RSU may be more expensive.
  171.  
  172. The  program  contains no technical means  to  enforce  payment
  173. other  than  noting  the  requirement on  screen  when  RSU  is
  174. started.
  175.  
  176. To  pay the fee log on to CompuServe and enter the command:  GO
  177. SWREG. Search for the keyword RSU and register according to the
  178. choices you get on screen.
  179.  
  180. The program may be freely distributed as long as the files stay
  181. together  unaltered and packed in one file using  an  archiving
  182. program  like PKZIP, LHA or similar. It is not allowed  to  add
  183. any  other files other than minor additions that do not  exceed
  184. the size of the original files. It is not allowed to distribute
  185. RSU  as part of another program or package because we fear that
  186. this  might look as if RSU may no longer require its  shareware
  187. fee  payment  which  it  always does  according  to  the  rules
  188. outlined above.
  189.  
  190. Through  CompuServe  Mail  you  can  reach  Hans-Georg   Michna
  191. 74776,2361  if  you have questions, remarks  or  proposals  for
  192. future  enhancements  of RSU. You can also  reach  him  through
  193. Internet mail: 74776.2361@compuserve.com
  194.  
  195. Disclaimer:  At the present state of software technology it  is
  196. not  possible  to create error-free software. RSU  may  contain
  197. errors.  Anybody using it should take precautions like creating
  198. safety  backups in case a defect causes damage to any  computer
  199. or  data. The authors of RSU can under no circumstances be held
  200. responsible for any damage.
  201.  
  202.  
  203.  
  204. Introduction
  205.  
  206. RSU  (Remote  Software Update) is a program  that  updates  the
  207. software  on  many individual workstation1 PCs connected  to  a
  208. file  server. The file server, when equipped with RSU,  becomes
  209. an RSU server.
  210.  
  211. The  RSU  program does not run on the RSU server,  however.  It
  212. runs only on the workstations. The RSU server consists only  of
  213. subdirectories and files on the file server.
  214.  
  215.                                
  216.                                
  217.                                
  218.                     Sample RSU installation
  219.  
  220.  
  221. The fundamental idea is that all workstation configurations are
  222. stored  on  the  RSU  server. RSU then copies  the  appropriate
  223. modules to each workstation while retaining individual settings
  224. or individual software on the workstations.
  225.  
  226. The  file server used for RSU does not have to be the same file
  227. server  that  is  used  for normal work. It  is  necessary,  of
  228. course,  that users log in to the RSU server from time to  time
  229. to get the topical remote software update.
  230.  
  231. Since  the file server does not usually run DOS a separate  RSU
  232. test   workstation   is  needed  to  develop   and   test   the
  233. configurations. If testing on different hardware is needed then
  234. one RSU test workstation is needed for each hardware setup. RSU
  235. test workstations can be used for other work when they are  not
  236. being used for RSU development. Their RSU related configuration
  237. has  to  be  totally  reset, however, before  it  is  used  for
  238. testing. RSU can
  239.  
  240. ∙   copy  predetermined  files  from  the  RSU  server  to  the
  241.  workstations,
  242.  
  243. ∙   change   the   contents  of  subdirectories,   even   whole
  244.  subdirectory  trees, on the workstation  PCs  such  that  they
  245.  become  equal to their parents on the RSU server,  by  adding,
  246.  deleting or overwriting files on the target PC,
  247.  
  248. ∙ add, change, copy or delete certain sections or certain lines
  249.  in INI files like WIN.INI and SYSTEM.INI,
  250.  
  251. ∙  find out whether each workstation is already up to date  and
  252.  skip the updating process.
  253.  
  254.  
  255.  
  256. How RSU Works
  257.  
  258. Since the file server or any program running on any workstation
  259. has  normally no access to any local disks the main RSU program
  260. has  to  run  on each workstation to work its magic.  The  most
  261. convenient way to achieve this is to run it each time any  user
  262. logs in to the RSU server.2
  263.  
  264. This  can  be achieved in different ways on different operating
  265. systems.  On  a Novell network, for example, a command  can  be
  266. called up after the system login script finishes, by using  the
  267. Novell  EXIT "<command>" syntax or by calling it in the  middle
  268. of  the login script with the # syntax. See the manual of  your
  269. network  for details. RSU can be called from a DOS batch  file.
  270. It  has one command line parameter which is the path of the RSU
  271. program file. Example:
  272.  
  273.     f:\rsu\rsu.exe  f:\rsu\rsu.prg
  274.  
  275.  
  276. RSU.EXE  will execute the RSU program file. Files are typically
  277. copied from the RSU server to the local disk or modified on the
  278. local  disk.  Instead  of the local disk  the  individual  user
  279. storage  space may also be on a file server. In this case  each
  280. user's  private  storage should be mapped to a drive  like  U:,
  281. such  that  each  user sees his private storage  area  when  he
  282. refers to U:.
  283.  
  284.  
  285.  
  286. Installing RSU
  287.  
  288.  
  289. RSU Server Preparation
  290.  
  291. Each  file server can be a RSU server. The basic method  is  to
  292. keep a mirror image of a workstation in a RSU server directory,
  293. for  example  in  F:\RSU\WSIMAGE. There  can  be  several  such
  294. directories   for   several   different   configurations.   The
  295. configurations   have  to  be  created  and  tested   on   test
  296. workstations,  then copied to the RSU server. In  addition  the
  297. RSU  server needs one other directory with read-only access for
  298. the  RSU program files RSU.EXE, EQUAL.COM, SYNCDIR.EXE and  the
  299. RSU  program  file (example: RSU.PRG, example of RSU  read-only
  300. directory: F:\RSU).
  301.  
  302. RSU does not handle the management of more than one workstation
  303. configuration,  but this can easily achieved by creating  small
  304. signal  files on the different workstations which indicate  the
  305. configuration type. The existence of any of these signal  files
  306. can  then be queried by a simple "if exist" command in a  batch
  307. file. Another method is the BIOS scan which can be performed by
  308. a  utility  like  PC Magazine's STRINGS or  by  a  small  Basic
  309. program, for example. Thus the BIOS version of the computer or,
  310. for   example,  of  the  display  adapter  can  be   determined
  311. automatically  and  the  appropriate  configuration   installed
  312. without any manual intervention.
  313.  
  314.  
  315. Workstation Preparation
  316.  
  317. Before   installing  RSU  you  have  to  make  sure  that   all
  318. workstations  connected to the RSU server have a valid  minimal
  319. installation.  The absolute minimum would be an  installed  DOS
  320. and  the minimal network drivers to be able to connect  to  the
  321. server.
  322.  
  323. It  is  recommended that you have an initial workstation  setup
  324. procedure to erase all RSU related directories and files from a
  325. workstation and recreate the whole minimal setup from  scratch.
  326. This  could be done with a batch file like INSTALL.BAT  on  the
  327. RSU  server.  This will be very useful for users if  they  have
  328. somehow  destroyed vital files on their workstation. They  will
  329. then  have a way to get up and running again if all else  fails
  330. and no service person is available.
  331.  
  332. It  is also conceivable to use RSU to such an extent that  each
  333. and every file on the workstation is covered by RSU. This would
  334. have  the  advantage that every workstation would recover  from
  335. any  loss or mutilation of files automatically when logging  on
  336. to  the RSU server. But this will often not be practicable  for
  337. performance or other reasons. A general hint is to  reduce  use
  338. of local hard disks and user specific storage to a minimum such
  339. that lengthy file copying is not required. It is easier to  add
  340. a file to the file server than to 100 local hard disks.
  341.  
  342.  
  343.  
  344. The RSU Development Cycle
  345.  
  346.  
  347. Steps of the RSU Development Cycle
  348.  
  349. The  RSU development cycle is the process of developing  a  new
  350. configuration. Frequently this will just be a small  change  in
  351. an existing configuration, but it could also be an entirely new
  352. configuration  for  a  new  type of workstation,  for  example.
  353. Development proceeds in these steps:
  354.  
  355. 1.Prepare  a  RSU  test workstation by making it equivalent  to
  356.   the topical RSU update level.
  357.  
  358. 2.Create  and  test a new configuration or modify the  existing
  359.   one on a test workstation.
  360.  
  361. 3.Temporarily protect users from your RSU server changes.
  362.  
  363. 4.Upload  (copy) the new workstation configuration to  the  RSU
  364.   server or modify the existing one on the RSU server.
  365.  
  366. 5.If necessary, adapt the RSU program file (example: RSU.PRG).
  367.  
  368. 6.Test the new RSU setup on a test workstation.
  369.  
  370. 7.Activate  the new setup, such that it gets installed  on  all
  371.   target workstation PCs (undo step 3).
  372.  
  373. In  many  cases  this  development cycle can  be  shortened  by
  374. skipping certain actions if their effect is minimal or  if  the
  375. number of workstations is low enough such that some risk can be
  376. taken.
  377.  
  378. The following sections describe these actions in detail.
  379.  
  380.  
  381. Prepare an RSU Test Workstation
  382.  
  383. First  you have to make sure that your RSU test workstation  is
  384. equal to a topical workstation elsewhere in the network. If the
  385. test workstation has not been used for anything that might have
  386. altered the files and directories concerned then it can be used
  387. right away. If not, and whenever there are any doubts, the test
  388. workstation should be installed fresh from the RSU  server.  It
  389. is  a  good  precaution to log in once after  installation  and
  390. obtain the latest changes from the RSU server to make sure they
  391. are included in the workstation image on the RSU server.
  392.  
  393. The  RSU update level information can be stored in any file for
  394. each  workstation. You only have to edit this file or touch  it
  395. such that the file date or time is changed to force an update.
  396.  
  397. Start  the  RSU  program, normally by logging  in  to  the  RSU
  398. server. The test workstation should automatically be updated to
  399. the  topical update level. After the test workstation is up  to
  400. the present standard you can now make the desired changes.
  401.  
  402.  
  403. Create and Test the New Module
  404.  
  405. Now  you  can make the desired modification on the test machine
  406. only. Test thoroughly, since all your users who use that module
  407. will depend on your conscientiousness.
  408.  
  409.  
  410. Protect Users From Your Tests
  411.  
  412. As soon as you touch the RSU server all users who happen to use
  413. the server will receive any modification. Therefore you have to
  414. make sure that this does not happen.
  415.  
  416. There are several ways to protect users:
  417.  
  418. 1.Deactivate the whole RSU server until you are done  with  all
  419.   changes.  One  way is to rename the RSU program.  Without  it
  420.   RSU  will  not be able to do anything. Another is to activate
  421.   a jump over the RSU part of the controlling batch file.
  422.  
  423. 2.Leave  the RSU server running and create a second RSU  server
  424.   at  least for the module you intend to work on. This  is  not
  425.   quite  so  difficult as it sounds. It may  be  necessary  for
  426.   bigger changes that require some time to work out.
  427.  
  428. 3.If  you are making a very small change and you are absolutely
  429.   sure  that even a mistake can do no harm you may risk to work
  430.   on  the  hot system. But be careful! Depending on the  number
  431.   of  workstations and likelihood of a login you should be able
  432.   to  make  the change within seconds. This might be viable  if
  433.   you  just  want to change a few files, for example. Again  do
  434.   not  forget  to  change the date and time of the  RSU  update
  435.   level  file  afterwards, so all users get a new  update  when
  436.   they log in.
  437.  
  438.  
  439. Upload the New Module to the RSU Server
  440.  
  441. After you have tested the new configuration thoroughly on  your
  442. test  machine  you can now copy the modifications  to  the  RSU
  443. server  (for  example to the F:\RSU\WSIMAGE directory  and  its
  444. subdirectories). It is useful to have a program that can detect
  445. the  difference  between files on two drives  like  the  Norton
  446. CommanderÖ with its "Compare directories" command. In any  case
  447. be  sure  to copy all changes from the test machine to the  RSU
  448. server.
  449.  
  450.  
  451. Adapt the RSU Program
  452.  
  453. Now  change  the  RSU  program  (example:  F:\RSU\RSU.PRG)   if
  454. necessary. The modified RSU program should be able to copy  all
  455. modifications from the RSU server area to any workstation PC.
  456.  
  457. If you make changes to files by means of direct manipulation by
  458. the  RSU  program, for example with IniChangeLine, be  sure  to
  459. make  those changes on the original files on the RSU server  as
  460. well,  such that users who do an install from scratch also  get
  461. them immediately before they receive the next RSU update.
  462.  
  463.  
  464. Test the New RSU Program
  465.  
  466. After the update is entirely in place but not yet activated you
  467. should  test it before releasing it to all users. For this  you
  468. either  need  a second test machine or you have  to  reset  the
  469. first one to the previous configuration which is still standard
  470. for all other users.
  471.  
  472. Then you have to make sure that the new update affects only the
  473. test machine but not yet all the other users. There are several
  474. ways  to achieve this. The easiest is to modify the batch  file
  475. which  calls RSU.EXE such that only the testing user  gets  the
  476. update. Example:
  477.     
  478.     ...
  479.     if not "%USER%"=="SUPERVISOR" goto NOT_YET
  480.     rem   Enter other batch commands here
  481.     rem   then call RSU:
  482.     f:
  483.     cd \RSU
  484.     rsu.exe rsu.prg
  485.     :NOT_YET
  486.     ...
  487.  
  488.  
  489. This  sample batch file fragment presumes that the network user
  490. name  was  written  into  the environment  variable  USER,  for
  491. example  with the Novell Netware login script command  DOS  SET
  492. USER="%USER_ID".
  493.  
  494. Check whether the update is correct. You may have to test  each
  495. configuration separately if there are several.
  496.  
  497.  
  498. Activate the New RSU Program
  499.  
  500. Finally, after you have convinced yourself that the new  update
  501. works  correctly, you can release it to all users  by  removing
  502. any  blocking commands you might have inserted. From that  very
  503. moment all users who log on will receive the update.
  504.  
  505.  
  506.  
  507. Control Files
  508.  
  509.  
  510. RSU Batch File
  511.  
  512. RSU  will probably be called from a batch file, though it might
  513. also  be called from some network specific script like Novell's
  514. System or User Login Script. Assuming it is called from a batch
  515. file, an example might be this:
  516.  
  517.     rem   RSU Batch File
  518.     
  519.     rem   First find whether this user has already 
  520.     rem   received the latest version:
  521.     f:\rsu\equal c:\rsu\version.txt f:\rsu\version.txt
  522.     if not errorlevel 1 goto NO_UPDATE
  523.     
  524.     rem   Display of version message:
  525.     echo off
  526.     cls
  527.     type f:\rsu\version.txt
  528.     echo.
  529.     pause
  530.     echo.
  531.     
  532.     rem   Now call RSU program:
  533.     c:
  534.     cd \
  535.     f:
  536.     cd \rsu
  537.     rsu.exe rsu.prg
  538.     
  539.     rem   Finally make sure user gets new VERSION.TXT 
  540.     rem   such that he doesn't get this particular update 
  541.     rem   again the next time he logs on:
  542.     copy f:\rsu\version.txt c:\rsu
  543.     :NO_UPDATE
  544.  
  545.  
  546. RSU Program (RSU.PRG)
  547.  
  548. The  RSU program is the file which controls all RSU operations.
  549. It   should   reside  on  the  RSU  server,  for   example   as
  550. F:\RSU\RSU.PRG. All users should have read-only access  to  it.
  551. This is an example of an RSU.PRG file:
  552.  
  553.     rem   RSU.PRG file
  554.     
  555.     rem   Modifications to WIN.INI:
  556.     
  557.     IniCopySection f:\rsu\wsimage\win31\win.ini c:\win31\win.ini [fonts]
  558.     IniCopySection f:\rsu\wsimage\win31\win.ini c:\win31\win.ini [devices]
  559.     IniDeleteSection c:\win31\win.ini [ObscureOldProgram]
  560.     IniCopyLine f:\rsu\wsimage\win31\win.ini c:\win31\win.ini [windows] load
  561.     IniDeleteLine c:\win31\win.ini [fonts] Swiss=
  562.     IniChangeLine c:\win31\win.ini [mail] mailbox=%USER%
  563.     
  564.     rem   Modifications to SYSTEM.INI:
  565.     
  566.     IniAddLine c:\win31\system.ini [display] svgamode=98
  567.     
  568.     rem   Synchronization of user files:
  569.     
  570.     f:\rsu\syncdir f:\rsu\wsimage\win31 c:\win31 /a
  571.     f:\rsu\syncdir f:\rsu\wsimage\util  c:\util  /a /o /d /s
  572.     
  573.     rem   End Of File
  574.  
  575.  
  576.  
  577. Alphabetical List of Commands
  578.  
  579.  
  580. General Command Syntax
  581.  
  582. All control files are text files in which each line is followed
  583. by a carriage return/line feed pair (13dec and 10dec).
  584.  
  585. Spaces  and  tab characters in the beginning of  any  line  are
  586. totally  ignored. In effect it is as if those  characters  were
  587. removed before executing the RSU.PRG program.
  588.  
  589. Lines beginning with "REM " are comments.
  590.  
  591. Upper and lower case are functionally equivalent. However,  the
  592. case  is  retained when information is forwarded  into  another
  593. file.
  594.  
  595. Substitutions of environment variables (like %USER%)  are  done
  596. before the commands are executed.
  597.  
  598. If the first word in any line is a valid RSU command then it is
  599. executed. If not the line is deemed to be a DOS command and  is
  600. forwarded to the DOS command processor. Note, however, that not
  601. every DOS command can be used. For example, the DOS command SET
  602. has  no  effect because it is running under a secondary command
  603. processor that has no access to the primary environment.
  604.  
  605.  
  606. Environment Variables
  607.  
  608. Environment variables can be inserted in any command  with  the
  609. syntax:
  610.  
  611.     %<environment variable>%
  612.  
  613. Example:
  614.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=%USER%
  615.  
  616. This  example  will take the name from the USER= entry  in  the
  617. environment  and substitute it for %USER% before executing  the
  618. IniChangeLine command. For example, if the environment contains
  619. an entry reading:
  620.  
  621.     USER=DANIEL
  622.  
  623. then the command will be changed to:
  624.  
  625.     IniChangeLine C:\WIN31\WIN.INI [mail] mailbox=DANIEL
  626.  
  627. which  is useful for example to save users the separate logging
  628. in to Microsoftr Mail.
  629.  
  630. Hint:  Novell   Netware   3.11  can  place   essential   system
  631.        information  entries  in the environment  with  the  SET
  632.        <variable>="<text>"      syntax.      Example:       SET
  633.        USER="%USER_ID"
  634.  
  635.  
  636. DOS Commands
  637.  
  638. Any  command found in an RSU program file that is not  a  valid
  639. RSU  command is deemed to be a DOS command. A secondary command
  640. processor (COMMAND.COM) is loaded and the command forwarded  to
  641. it and executed.
  642.  
  643. There is no error checking and no logging with DOS commands, so
  644. be careful to test and use them properly.
  645.  
  646.  
  647. Equal
  648.  
  649. This  command  is not a normal RSU command but  a  DOS  utility
  650. program  EQUAL.COM  which  determines  whether  two  files  are
  651. exactly  equal  in  size, date and time. The  following  sample
  652. batch file illustrates its use, but normally only one command
  653.  
  654.     if errorlevel 1 ...
  655.  
  656. is necessary to determine whether the two files are equal.
  657.  
  658. Syntax:
  659.     equal <file 1> <file 2>
  660.  
  661. Sample:
  662.     f:\rsu\equal c:\rsu\version.txt f:\rsu\version.txt
  663.     if not errorlevel 1 goto NO_UPDATE
  664.  
  665. Extended sample batch file:
  666.  
  667.     @echo off
  668.     equal.com %1 %2
  669.     IF ERRORLEVEL 4 goto NO_MEMORY
  670.     IF ERRORLEVEL 3 goto FILE_NOT_FOUND
  671.     IF ERRORLEVEL 2 goto WRONG_PARAMETERS
  672.     IF ERRORLEVEL 1 goto NOT_EQUAL
  673.     IF ERRORLEVEL 0 goto EQUAL
  674.     :NOT_EQUAL
  675.     echo The files %1 and %2 are not equal.
  676.     goto FINISH
  677.     :WRONG_PARAMETERS
  678.     echo Wrong parameters! Usage: EQUAL.BAT <file 1> <file 2>
  679.     goto FINISH
  680.     :FILE_NOT_FOUND
  681.     echo Error: One of the two files could not be found.
  682.     goto FINISH
  683.     :NO_MEMORY
  684.     echo Error: Not enough memory to execute EQUAL.COM.
  685.     goto FINISH
  686.     :EQUAL
  687.     echo The files %1 and %2 are equal.
  688.     :FINISH
  689.  
  690.  
  691. IniAddLine
  692.  
  693. This command is used to add a line where several lines have the
  694. same  variable  name,  like for example the  device=  lines  in
  695. SYSTEM.INI. It appends one further line to the section.
  696.  
  697. The  only exception occurs if the exact line, variable name and
  698. text,  exists in the file already. In this particular case  the
  699. command  has  no effect. In other words, the command  does  not
  700. produce exact duplicates of whole lines like:
  701.  
  702.     device=VPD.386
  703.     device=VPD.386
  704.  
  705. Syntax:
  706.     IniAddLine <ini file> [<section name>] <variable
  707.       name>=<text>
  708.  
  709. Example:
  710.     IniAddLine C:\WIN31\SYSTEM.INI 386Enh device=VPD.386
  711.  
  712. Note:    Version 1.00 of RSU has a shortcoming that leads to  a
  713. line  being rejected as already present if the line to be newly
  714. added  is  equal to part of the line which is already  present.
  715. For  example, if a line "device=VPD.386" is already present  in
  716. the   section   then  RSU  will  refuse   to   add   the   line
  717. "device=VPD.3".
  718.  
  719.  
  720. IniChangeLine
  721.  
  722. This  command changes the text after the equals sign (=)  in  a
  723. certain  section  and a certain line in an .INI  file.  If  the
  724. section does not exist it is newly created and appended to  the
  725. .INI file first. If the line does not exist it is newly created
  726. and  appended at the end of the section. If several lines  with
  727. the  same variable name exist in the section then this  command
  728. is  probably  not appropriate and should not be used  since  it
  729. would change only one of the lines.
  730.  
  731. Syntax:
  732.     IniChangeLine <ini file> [<section name>]
  733.       <variable>=<text>
  734.  
  735. Example:
  736.     IniChangeLine C:\WIN31\WIN.INI [windows] load=NWPOPUP.EXE
  737.  
  738. Note that there is presently no command to change only part  of
  739. a  line.  If  something  like  this  is  desired  one  possible
  740. workaround is to use EDLIN in batch mode.
  741.  
  742.  
  743. IniCopyLine
  744.  
  745. This  command finds a certain line within a section in an  .INI
  746. file  and copies it into another .INI file. If a line with  the
  747. same  variable name to the left of the equals sign (=)  already
  748. exists it is replaced with the new line. If several lines  with
  749. the  same variable name exist in the section then this  command
  750. is  probably  not  appropriate.  It  will  work  on  the  first
  751. occurrence of the variable.
  752.  
  753. Syntax:
  754.     IniCopyLine <source ini file> <target ini file> [<section
  755.       name>] <variable>
  756.  
  757. Examples:
  758.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  759.       [windows] load
  760.     IniCopyLine F:\RSU\WSIMAGE\WIN31\WIN.INI C:\WIN31\WIN.INI
  761.       [windows] load=
  762.  
  763. Both example lines do the same thing. Each one would search the
  764. file  F:\RSU\WSIMAGE\WIN31\WIN.INI for the  section  [windows].
  765. Within  the  section  it would locate the line  beginning  with
  766. load=  and  copy  it into the line with the  same  section  and
  767. variable name in the file C:\WIN31\WIN.INI.
  768.  
  769.  
  770. IniCopySection
  771.  
  772. Same but copies whole section.
  773.  
  774. Syntax:
  775.     IniCopySection <source ini file> <target ini file>
  776.       [<section name>]
  777.  
  778. Example:
  779.     IniCopySection F:\RSU\WSIMAGE\WIN31\WIN.INI
  780.       C:\WIN31\WIN.INI [HPPCL5A,LPT1:]
  781.  
  782. This  example would copy the whole section [HPPCL5A,LPT1:] from
  783. F:\RSU\WSIMAGE\WIN31\WIN.INI to C:\WIN31\WIN.INI. If there  was
  784. a  section with that name before it will be overwritten and all
  785. information  lost  entirely. If the previous section  contained
  786. more or other lines than the new those old lines will be lost.
  787.  
  788.  
  789. IniDeleteLine
  790.  
  791. This command deletes a line in an .INI file.
  792.  
  793. Syntax:
  794.     IniDeleteLine <ini file> [<section name>] <variable>
  795.  
  796. Examples:
  797.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling
  798.     IniDeleteLine C:\WIN31\WIN.INI [mail] Polling=
  799.  
  800. This  example  will  search C:\WIN31\WIN.INI  for  the  section
  801. [mail]  and  in  this  section  for  the  line  beginning  with
  802. Polling=. This line will be deleted from WIN.INI.
  803.  
  804.  
  805. IniDeleteSection
  806.  
  807. Syntax:
  808.     IniDeleteSection <ini file> [<section name>]
  809.  
  810. Example:
  811.     IniDeleteSection C:\WIN31\WIN.INI [Microsoft Word]
  812.  
  813. Both  example  lines do the same thing. Each  one  will  search
  814. C:\WIN31\WIN.INI for the section [Microsoft Word].  The  entire
  815. section will be deleted from WIN.INI.
  816.  
  817.  
  818. SyncDir
  819.  
  820. Makes  the  target  directory equal  to  the  source  directory
  821. including all files, but excepting all files that have a  read-
  822. only, hidden or system attribute.
  823.  
  824. Note  that  this is not an internal RSU command.  Instead  this
  825. command  is  handled  like a DOS command  and  the  SYNCDIR.EXE
  826. utility  is called. This may be changed in a future version  of
  827. RSU.
  828.  
  829. SyncDir  handles  all  files regardless  of  their  attributes.
  830. Attributes are copied with each file.
  831.  
  832. The SyncDir command requires switches to control its operation.
  833. The  following switches can be used, and at least one  of  them
  834. has to be used, otherwise SyncDir will not do anything:
  835.  
  836. /D     Delete  files  from the target directory if  they  don't
  837.        exist in the source directory.
  838.  
  839. /A     Add  files to the target directory if they are not there
  840.        already.
  841.  
  842. /O     Overwrite  files in the target directory  if  they  also
  843.        exist  in  the source directory but are different  (have
  844.        different  size, date or time). This switch may  not  be
  845.        used together with the /C switch.
  846.  
  847. /C     Conflict  management.  This  switch  may  not  be   used
  848.        together  with the /O switch. If a file name  exists  in
  849.        both  source  and target directories but with  different
  850.        size,  date or time, then this is considered a  conflict
  851.        and the following actions are taken:
  852.        
  853.        1.     Both files are put into the target directory  and
  854.          the  older one gets a new name like !SYNnnnn.xxx where
  855.          nnnn is a number between 0001 and 9999 and xxx is  the
  856.          original extension of the file.
  857.        
  858.        2.     A  line  is appended to the file !SYN0000.TXT  in
  859.          the  target  directory containing the date,  time  and
  860.          conflicting  file information separated by  semicolons
  861.          (;), ready for import into a conflict database.
  862.  
  863.        One  possible purpose of this function is to allow users
  864.        with   portable   PCs   to  copy  their   network   user
  865.        directories home with them and later reconciliate  their
  866.        local  user  directories with those on  the  network  if
  867.        both can have changed.
  868.  
  869. Warning:     SyncDir  will  overwrite or erase files  with  any
  870.        attributes  in  the target directory and,  with  the  /S
  871.        switch,  any  of its subdirectories, even  if  they  are
  872.        read-only, hidden or system files.
  873.  
  874. Syntax:
  875.     SyncDir <source directory> <target directory> [/D] [< /O |
  876.       /C >] [/A] [/S]
  877.  
  878. Examples:
  879.     SyncDir F:\RSU\WSIMAGE\U C:\U /D /O /A /S
  880.     SyncDir F:\RSU\WSIMAGE\DOS C:\DOS /O /A
  881.  
  882. The  first  line would make the directory C:\U and all  of  its
  883. subdirectories  exactly equal to the directory F:\RSU\WSIMAGE\U
  884. and all of its subdirectories.
  885.  
  886. The  second  would  overwrite any  files  in  C:\DOS  that  are
  887. different from their namesakes in F:\RSU\WSIMAGE\DOS. It  would
  888. also  add  files that are missing in C:\DOS, but it  would  not
  889. delete  or  otherwise touch any additional files the  user  may
  890. have  added to his DOS directory. It would also not  touch  any
  891. subdirectories of C:\DOS.
  892.  
  893.  
  894. _______________________________
  895.  
  896. 1  The  term  "workstation" is used  here  for  all  user  PC's
  897. connected  to  the  network, using  DOS,  not  for  engineering
  898. workstations running Unix or the like.
  899.  
  900. 2  Another  method  is to run it each time the  workstation  is
  901. started,  from  the  AUTOEXEC.BAT file. Since  users  have  few
  902. rights on the file server at that time it would be necessary to
  903. adjust those rights such that all users have reading rights  to
  904. all  RSU data without being logged in. This may or may  not  be
  905. possible on different network operating systems.
  906.